package com.xiaotao.mapper;

import com.xiaotao.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * OrdersMapper继承基类
 */
@Mapper
@Repository
public interface OrdersMapper extends MyBatisBaseDao<Orders, String> {
    // 根据用户ID查询订单
    List<Orders> selectOrdersByUserId(@Param("userId") Integer userId);

    // 查询待支付订单
    List<Orders> selectPendingPaymentOrders();

    // 根据状态查询订单
    List<Orders> selectOrdersByStatus(@Param("status") byte status);
    List<Orders> selectAll();
    Integer update (Orders orders);


}